<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 指令初体验
     1.先引入vue.js
     2.创建一个vue实例
     3.在html中写指令
     4.在js中写逻辑
 -->
     <div id="app" v-html="msg">

     </div>
     <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
     <script>
        const app = new Vue({
            el: '#app',
            data:{
                msg:'<h2>你好</h2>'
            }
        })
     </script>
</body>
</html>